<!DOCTYPE html> 
 <html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link type="text/css" rel="stylesheet" href="__PUBLIC__/css/style.css" />
    <!--[if IE 6]>
    <script src="__PUBLIC__/js/iepng.js" type="text/javascript"></script>
        <script type="text/javascript">
           EvPNG.fix('div, ul, img, li, input, a'); 
        </script>
    <![endif]-->   
    
    <script type="text/javascript" src="__PUBLIC__/js/jquery-2.1.3.min.js"></script>
    <script type="text/javascript" src="__PUBLIC__/js/menu.js"></script>    
            
    <script type="text/javascript" src="__PUBLIC__/js/lrscroll_1.js"></script>
        
    
    <script type="text/javascript" src="__PUBLIC__/js/n_nav.js"></script>   
     
     
<title>商品详情</title>
</head>
<body>  
<!--Begin Header Begin-->
<include file="./Public/page/header.html" />
<!--End Header End--> 
<!--Begin Menu Begin-->
<div class="menu_bg">
    <div class="menu">
        <!--Begin 商品分类详情 Begin-->    
        <div class="nav">
            <div class="nav_t">全部商品分类</div>
            <div class="leftNav none">
                <ul>      
                   <volist name="t_list" id="t_list">  
                    <li>
                        <div class="fj">
                            <span class="n_img"><span></span><img src="__PUBLIC__/images/nav1.png" /></span>
                            <span class="fl">{$t_list.name}</span>
                        </div> 
                        <notempty name="t_list['lower']">
                       
                        <div class="zj">
                            <div class="zj_l">
                             <volist name="t_list[lower]" id="w_list">
                                <div class="zj_l_c">
                                    <h2><a href="{:U('Home/List/index',['id'=>$w_list['id']])}">{$w_list['name']}</a></h2>
                                    <notempty name="w_list['lower']">
                                    <volist name="w_list['lower']" id="e_list">
                                    <a href="{:U('Home/List/index',['id'=>$e_list['id']])}">{$e_list['name']}</a>|
                                    </volist>
                                    </notempty>
                                </div>
                            </volist>
                            </div>
                        
                        </div>
                        
                        </notempty>
                    </li>
                    </volist>
                </ul>            
            </div>
        </div> 
		
        <!--End 商品分类详情 End-->                                                     
        <ul class="menu_r">    
		<!--导航-->  
		<include file="./Public/page/danhanglan.html" />                                                                      
        </ul>

    </div>
</div>
<!--End Menu End--> 
<div class="i_bg">    
    <div class="postion">
        <span class="fl"><a href="{:U('Home/Index/index')}">首页</a> > {$com}</span>
    </div>    
    <div class="content mar_10">
        <!--Begin 特卖 Begin-->
        <div class="s_left">
            <div class="lim_time">
                <div class="lim_sh_bg">
                    <span class="lim_sh">分享</span>
                    <a href="#"><img src="__PUBLIC__/images/sh_1.gif" /></a>
                    <a href="#"><img src="__PUBLIC__/images/sh_2.gif" /></a>
                    <a href="#"><img src="__PUBLIC__/images/sh_3.gif" /></a>
                    <a href="#"><img src="__PUBLIC__/images/sh_4.gif" /></a>
                    <a href="#"><img src="__PUBLIC__/images/sh_5.gif" /></a>
                </div>
                <table  id="goods_tb" border="0" style="width:100%; margin-bottom:50px;" cellspacing="0" cellpadding="0">
                  <tr valign="top">
                    <td width="315">
                        <div class="lim_name">{$list['goods']}</div>
                        <div class="lim_price">
                            <span class="ch_txt">{$list['price']}</span>
                            <a  class="ch_a" onclick="buy()" >购买</a>
                        </div>
                        <!-- {:U('Home/Buycar/index?')}?id={$list['id']} -->
                        <div class="lim_c">
                            <table border="0" style="width:100%; color:#888888;" cellspacing="0" cellpadding="0">
                              <tr>
                                <td width="25%">市场价 </td>
                                <td width="45%"><i>{$list['price']}</i>  ￥</td>
                                <td width="30%">积分:<b>{$list.num}</b></td>
                              </tr>
                            <!--   <tr style="font-family:'Microsoft YaHei';">
                                <td style="text-decoration:line-through;">￥{$list['price']}</td>                   
                                <td>100</td>
                              </tr> -->
                            </table>
                        </div>
                        <div class="lim_c">
                            <div class="des_choice">
                                <!-- <span class="fl">容量：</span>
                                <ul>
                                <foreach name="size" item="val"> -->
                                <!-- class="checked" -->
                                    <!-- <li>{$val}<div class="ch_img"></div>GB</li> -->
                                   <!--  <li>50ml<div class="ch_img"></div></li>
                                    <li>100ml<div class="ch_img"></div></li> -->
                                <!-- </foreach>
                                </ul> -->
                            </div>
                            <div class="des_choice">
                                <span class="fl">颜色：</span>
                                <ul>
                                <foreach name="color" key="key" item="val">
                                    <li>{$val}<div class="ch_img"></div></li>
                                   <!--  <li class="checked">白色<div class="ch_img"></div></li>
                                    <li>黑色<div class="ch_img"></div></li> -->
                                </foreach>
                                </ul>
                            </div>
                        </div>
                        <div class="lim_c">
                            <span class="fl">数量：</span><input type="text" value="1" onchange="change()" class="lim_ipt" />
                        </div>
                        <!-- <div class="lim_clock">
                            距离团购结束还有<br />
                            <span>1200 时 30 分 28 秒</span>
                        </div> -->
                    </td>
                    <td width="525" align="center" style="border-left:1px solid #eaeaea;"><img src="/TP/Uploads/comm/{$list.pic}" width="460" height="460" /></td>
                  </tr>
                </table>
            </div>
            <div class="des_border">
                <div class="des_tit">
                    <ul>
                        <li class="current"><a href="#p_attribute">商品属性</a></li>
                        <li><a href="#p_details">商品详情</a></li>
                        <li><a href="#p_comment">商品评论</a></li>
                    </ul>
                </div>
                <div class="des_con" id="p_attribute">
                    
                    <table border="0" align="center" style="width:100%; font-family:'宋体'; margin:10px auto;" cellspacing="0" cellpadding="0">
                      <tr>
                        <td>商品名称：{$param['goodsname']}</td>
                        <td>商品编号：{$param['gid']}</td>
                        <td>上架时间：{$list['addtime']}</td>
                      </tr>
                      <tr>
                        <td>商品毛重：{$param.weight}g</td>
                        <td>商品产地：{$param.place}</td>
                        <td>&nbsp;</td>
                      </tr>
                      <tr>
                        <td>大小：{$param.size}寸 </td>
                        <!-- <td>适合人群:{$param.person}</td> -->
                        <td>&nbsp;</td>
                      </tr>
                    </table>                                               
                                            
                        
                </div>
            </div>  
            
            <div class="des_border" id="p_details">
                <div class="des_t">商品详情</div>
                <div class="des_con">
                 <!--    <table border="0" align="center" style="width:745px; font-size:14px; font-family:'宋体';" cellspacing="0" cellpadding="0">
                      <tr>
                        <td width="265"><img src="__PUBLIC__/images/de1.jpg" width="206" height="412" /></td>
                        <td>
                            <b>迪奥真我香水(Q版)</b><br />
                            【商品规格】：5ml<br />
                            【商品质地】：液体<br />
                            【商品日期】：与专柜同步更新<br />
                            【商品产地】：法国<br />
                            【商品包装】：无外盒 无塑封<br />
                            【商品香调】：花束花香调<br />
                            【适用人群】：适合女性（都市白领，性感，有女人味的成熟女性）<br />
                        </td>
                      </tr>
                    </table>
                     -->
                    <p align="center">
                    <foreach name="img" item="img">
                    <img src="/TP/Uploads/comm/{$img.picname}" width="746" height="425" /><br /><br />
                   <!--  <img src="__PUBLIC__/images/de3.jpg" width="750" height="417" /><br /><br />
                    <img src="__PUBLIC__/images/de4.jpg" width="750" height="409" /><br /><br />
                    <img src="__PUBLIC__/images/de5.jpg" width="750" height="409" /> -->
                    </foreach>
                    </p>
                    
                </div>
            </div>  
            
            <div class="des_border" id="p_comment">
                <div class="des_t">商品评论</div>
                
                <table border="0" class="jud_tab" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="175" class="jud_per">
                        <p>80.0%</p>好评度
                    </td>
                    <td width="310">
                        <table border="0" style="width:100%;" cellspacing="0" cellpadding="0">
                          <tr>
                            <td width="90">好评<font color="#999999">（80%）</font></td>
                            <td><img src="__PUBLIC__/images/pl.gif" align="absmiddle" /></td>
                          </tr>
                          <tr>
                            <td>中评<font color="#999999">（20%）</font></td>
                            <td><img src="__PUBLIC__/images/pl.gif" align="absmiddle" /></td>
                          </tr>
                          <tr>
                            <td>差评<font color="#999999">（0%）</font></td>
                            <td><img src="__PUBLIC__/images/pl.gif" align="absmiddle" /></td>
                          </tr>
                        </table>
                    </td>
                    <!-- 2017_1_25 跳转到订单做评论-->
                    <td width="290" class="jud_bg">您可对已购买商品进行评价<br /><a href="{:U('home/member/member_order')}"><img src="__PUBLIC__/images/btn_jud.gif" /></a></td>
                  </tr>
                  <!-- 结束 -->
                </table>
                
                
                    <!-- 2017_1_25=====================展示评论             -->
                <table border="0" class="jud_list" style="width:100%; margin-top:30px;" cellspacing="0" cellpadding="0">
                  <foreach name="clist" item="clist">
                  <tr valign="top">
                    <td width="160"><img src="/TP/Uploads/user/{$clist.userpic}" width="20" height="20" align="absmiddle" />&nbsp;{$clist.username}</td>
                    <td width="180">
                        <!-- 颜色分类：<font color="#999999">粉色</font> <br />
                        型号：<font color="#999999">50ml</font> -->
                        {$clist.content}
                    </td>
                    <td>
                         
                        <font color="#999999">{:date("Y-m-d",$clist['addtime'])}</font>
                    </td>
                  </tr>
                </foreach>
                </table>
                    <!-- 展示评论结束 -->
               <!--  <div class="pages">
                   <a href="#" class="p_pre">上一页</a><a href="#" class="cur">1</a><a href="#">2</a><a href="#">3</a>...<a href="#">20</a><a href="#" class="p_pre">下一页</a>
               </div> -->
                
            </div>
            
        </div>        
        <!--End 特卖 End-->
        
        <div class="s_right">
            <div class="r_history">
                <div class="r_his_t">猜你喜欢</div>
                <ul>
                    <foreach name="like" item="like">
                    <li>
                        <div class="img"><a href="#"><img src="/TP/Uploads/comm/{$like.pic}" width="185" height="162" /></a></div>
                        <div class="name"><a href="{:U('Home/goods/index',['id'=>$like['id']])}">{$like.goods}</a></div>
                        <div class="price">
                            <font>￥<span>{$like.price}</span></font> &nbsp; 18R
                        </div>
                    </li>
                    </foreach>
                   <!--  <li>
                        <div class="img"><a href="#"><img src="__PUBLIC__/images/his_2.jpg" width="185" height="162" /></a></div>
                        <div class="name"><a href="#">Dior/迪奥香水2件套装</a></div>
                        <div class="price">
                            <font>￥<span>768.00</span></font> &nbsp; 18R
                        </div>
                    </li>
                    <li>
                        <div class="img"><a href="#"><img src="__PUBLIC__/images/his_3.jpg" width="185" height="162" /></a></div>
                        <div class="name"><a href="#">Dior/迪奥香水2件套装</a></div>
                        <div class="price">
                            <font>￥<span>680.00</span></font> &nbsp; 18R
                        </div>
                    </li> -->
                </ul>
            </div>
            <div class="sell_hot">
                <div class="s_hot_t">
                    <span class="fl">热销品牌</span>
                    <span class="h_more fr"><a href="#">更多</a></span>
                </div>
                <ul>
                    <li><a href="#"><img src="__PUBLIC__/images/hb_1.jpg" width="160" height="59" /></a></li>
                    <li><a href="#"><img src="__PUBLIC__/images/hb_2.jpg" width="160" height="59" /></a></li>
                    <li><a href="#"><img src="__PUBLIC__/images/hb_3.jpg" width="160" height="59" /></a></li>
                    <li><a href="#"><img src="__PUBLIC__/images/hb_4.jpg" width="160" height="59" /></a></li>
                    <li><a href="#"><img src="__PUBLIC__/images/hb_5.jpg" width="160" height="59" /></a></li>
                    <li><a href="#"><img src="__PUBLIC__/images/hb_6.jpg" width="160" height="59" /></a></li>
                    <li><a href="#"><img src="__PUBLIC__/images/hb_7.jpg" width="160" height="59" /></a></li>
                    <li><a href="#"><img src="__PUBLIC__/images/hb_8.jpg" width="160" height="59" /></a></li>
                    <li><a href="#"><img src="__PUBLIC__/images/hb_9.jpg" width="160" height="59" /></a></li>
                    <li><a href="#"><img src="__PUBLIC__/images/hb_10.jpg" width="160" height="59" /></a></li>
                    <li><a href="#"><img src="__PUBLIC__/images/hb_11.jpg" width="160" height="59" /></a></li>
                    <li><a href="#"><img src="__PUBLIC__/images/hb_12.jpg" width="160" height="59" /></a></li>
                </ul>
            </div>
        </div>
    </div>    
    <!--Begin Footer Begin -->
     <include file="./Public/page/footer.html" />
    <!--End Footer End -->    
</div>
</body>
<script>
var jq = jQuery.noConflict();

   //取得购买数量 显示价格
   function change()
   {
        var num = jq('.lim_c input').val();
       var price = jq('.lim_c i').html();
       if(parseInt(num)== num){
        if(num > 10){
            jq('.lim_c input').val('10');
            jq('.lim_price .ch_txt').html(10*price);
         }else if(num < 0){
            jq('.lim_c input').val('1');
            jq('.lim_price .ch_txt').html(price);
         }else{
            jq('.lim_price .ch_txt').html(num*price);
         }
         }else{
            jq('.lim_c input').val('1');
            jq('.lim_price .ch_txt').html(price);
         }
       }
    //--结束
    //设置默认颜色 大小
    jq('.lim_c .des_choice:first-child ul li:first-child').addClass('checked');
    jq('.lim_c .des_choice:last-child ul li:first-child').addClass('checked');
    //选择颜色 大小事件
    jq('.lim_c .des_choice:first-child ul li').click(function(){
        jq('.lim_c .des_choice:first-child ul li').removeClass('checked');
       jq(this).addClass('checked');
       // alert(jq(this).text());
    });
     jq('.lim_c .des_choice:last-child ul li').click(function(){
        jq('.lim_c .des_choice:last-child ul li').removeClass('checked');
       jq(this).addClass('checked');
    });
     //确认购物
    function buy(){
        //获取用户购物属性
        var num = jq('.lim_c input').val();
        var price = jq('.lim_c i').html();
        var total = num*price;
        var size= jq('.lim_c .des_choice:first-child ul .checked').text();
        var color = jq('.lim_c .des_choice:last-child ul .checked').text();
        var goodsname = jq('#goods_tb .lim_name').text();
        var id = {$list['id']};
        var goodspic = "{$list['pic']}";
        // var uid = {$Think.session.user};
        var integral = jq('.lim_c td b').html();
        var url = "{:U('Home/Buycar/writebc')}";
        //使用ajax将用户购物属性传递到服务器
        jq.get(url,{
            'gid':id,
            'number':num,
            'price':price,
            'color':color,
            'size':size,
            'goodsname':goodsname,
            // 'uid':uid,
            'integral':integral,
            'goodspic':goodspic,
            'total':total
        },function(data){
            if(data == '购物成功'){
                 window.location.href = "{:U('Home/Buycar/index')}";
                 // alert(data);
            }else{
                alert('购物失败，请登录');
            }
        });
    }
</script>
<!--[if IE 6]>
<script src="__PUBLIC__///letskillie6.googlecode.com/svn/trunk/2/zh_CN.js"></script>
<![endif]-->
</html>
